package com.gongfutrip.trans;

import com.gongfutrip.trans.client.common.CommunicationMode;
import com.gongfutrip.trans.client.common.Message;
import com.gongfutrip.trans.client.common.SendCallback;
import com.gongfutrip.trans.client.common.SendResult;
import com.gongfutrip.trans.client.exception.ClientException;

public interface Producer extends Client {
  public SendResult sendSync(Message msg, long timeout) throws ClientException;

  public SendResult sendSync(Message msg) throws ClientException;

  public SendResult sendAsync(Message msg, long timeout, SendCallback sendCallback)
      throws ClientException;

  public SendResult sendAsync(Message msg, SendCallback sendCallback) throws ClientException;

  public SendResult sendOneWay(Message msg, long timeout) throws ClientException;

  public SendResult sendOneWay(Message msg) throws ClientException;

  public SendResult send(Message msg, final CommunicationMode communicationMode,
      final SendCallback sendCallback, final long timeout) throws ClientException;


}
